<?php

namespace h5\controllers\base;

/**
 * H5的基类
 *
 * @author peng.huang
 */
class H5BaseController extends \application\controllers\base\BaseController {

    /**
     * 初始化
     */
    public function init() {
        // 禁止缓存
        $this->response->setHeaders(
                array('Content-type' => 'text/html;charset=utf-8',
                    'Cache-Control' => 'no-cache, must-revalidate',
                    'Last-Modified' => gmdate('D, d M Y H:i:s') . ' GMT',
                    'Pragma' => 'no-cache',
                    'Expires' => -1
                )
        );

        // 加载公共的js和css
        $this->addCss(array('bl'));
        $this->addJs(array('jquery-1.8.0.min', 'json2', 'api'));
        $this->addJs(array('zepto', 'main'), \peng\enums\JsPosition::BOTTOM);
    }

}
